<template>
  <div class="main-page">
    <router-view/>
  </div>
</template>
<script>
export default {
  name: 'home',
  data() {
    return {
    }
  },
  created() {

  },
  mounted(){
    window.addEventListener('hashchange',()=>{
      var currentPath = window.location.hash.slice(1); // 获取输入的路由
      console.log(currentPath)
      if(this.$router.path !== currentPath){
      this.$router.push(currentPath); // 动态跳转

      }
    },false);

    },


  methods: {
  },
  components: {
  },
  watch: {

  }
}
</script>

<style lang="scss" scoped>
.main-page{
  padding: 6px;
}
</style>
